//
//  SWSearchTableViewNoDataCell.m
//  sc-cyan-ios
//
//  Created by lvjian01 on 2017/12/18.
//  Copyright © 2017年 greenbuilding. All rights reserved.
//

#import "SWSearchTableViewNoDataCell.h"

@interface SWSearchTableViewNoDataCell ()
@property (weak, nonatomic) IBOutlet UILabel *messageLabel;
@property (weak, nonatomic) IBOutlet UIButton *sendMessageButton;

@property (weak, nonatomic) IBOutlet NSLayoutConstraint *sendMessageHeight;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *sendMessageBottom;


@end

@implementation SWSearchTableViewNoDataCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setNodataType:(SWSearchNoDataType)nodataType{
//    这里要根据不同用户权限设置样式
//    现在是死数据
    _nodataType = nodataType;
    switch (nodataType) {
        case SWSearchNoDataTypeProduct:
        {
            self.messageLabel.text = @"不好意思，没有根据权限设置";
            
        }
            break;
        case SWSearchNoDataTypeInquiry:
        {
            self.messageLabel.text = @"不好意思，还没有发布过租赁信息";
            self.sendMessageHeight.constant = 0;
            self.sendMessageBottom.constant = 0;
        }
            break;
        case SWSearchNoDataTypeCompany:
        {
            self.messageLabel.text = @"不好意思，有企业也不会给你看到";
        }
            break;
            
        default:
            break;
    }
}

- (IBAction)postMoreInfor:(UIButton *)sender {
    
    self.postMoreInfo(self.nodataType);
    
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
